package com.bskj.bms.bean.vo;

import com.bskj.common.bean.model.ParkInfo;
import com.bskj.common.enums.ParkChargeTypeEnum;
import com.bskj.common.utils.DateTimeUtil;

public class AllParkinfoVo extends ParkInfo {
	private String inTimes;
	private String outTimes;
	private String chargeTypes;
	private String couponMeg;
	private double money;
	private String boxNo;

	public String getCouponMeg() {
		return couponMeg;
	}

	public double getMoney() {
		return money;
	}

	public void setMoney(double money) {
		this.money = money;
	}

	public void setCouponMeg(String couponMeg) {
		this.couponMeg = couponMeg;
	}

	public void setCouponMeg(String name, double money,Integer couponType) {
		if(couponType == 1){
			this.couponMeg = name + "发放" + money + "元停车劵";
		}else {
			this.couponMeg = name + "发放全免停车劵";
		}
		
	}

	public String getInTimes() {
		return inTimes;
	}

	public void setInTimes(String inTimes) {
		this.inTimes = inTimes;
	}

	public String getOutTimes() {
		return outTimes;
	}

	public void setOutTimes(String outTimes) {
		this.outTimes = outTimes;
	}

	public String getChargeTypes() {
		return chargeTypes;
	}

	public void setChargeTypes(String chargeTypes) {
		this.chargeTypes = chargeTypes;
	}

	public String getBoxNo() {
		return boxNo;
	}

	public void setBoxNo(String boxNo) {
		this.boxNo = boxNo;
	}

	public AllParkinfoVo getAllParkinfoVo(ParkInfo parkInfo) throws Exception {
		AllParkinfoVo allParkinfoVo = new AllParkinfoVo();
		allParkinfoVo.setCarNo(parkInfo.getCarNo());
		allParkinfoVo.setCharge(parkInfo.getCharge());
		allParkinfoVo.setMoney(parkInfo.getNeedPayCharge());
		allParkinfoVo.setInTimes(DateTimeUtil.date2String(parkInfo.getInTime()));
		allParkinfoVo.setOutTimes(DateTimeUtil.date2String(parkInfo.getOutTime()));
		allParkinfoVo.setChargeTypes(ParkChargeTypeEnum.get(parkInfo.getChargeType()).getValue());
		allParkinfoVo.setBoxNo(parkInfo.getBoxNo());
		return allParkinfoVo;

	}
}
